package com.ndkj.consumer.service.consumer;

import com.ndkj.providercommon.client.ProviderService;
import com.ndkj.rpcserver.common.dto.Invocation;
import com.ndkj.rpcserver.common.utils.HttpClient;
import com.ndkj.rpcserver.proxy.ProxyFactory;

import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Properties;
import java.util.stream.Collectors;

public class Consumer {

    /**当前调用方法的环境和版本号*/
    private static final String CURRENT_VERSION = "1.0.0.daily";

    /**
     * TODO: Step 2
     * 发起RPC调用
     */
    public static void main(String[] args) {
        ProviderService providerServiceImpl = ProxyFactory.getMockAndTolerantProxy(ProviderService.class, CURRENT_VERSION);
        String result = providerServiceImpl.doSome("miaoliu");
        System.out.println(result);
        String result2 = providerServiceImpl.doSome2("miaoliu");
        System.out.println(result2);

    }

}
